package com.gxa.service.controller;

import com.gxa.common.base.RespResult;
import com.gxa.service.dto.SpecificationAreaDto;
import com.gxa.service.entity.SpecificationArea;
import com.gxa.service.service.SpecificationAreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@RestController
@RequestMapping("/specificationArea")
public class SpecificationAreaController {
    @Autowired
    private SpecificationAreaService service;
    /**
     * 增加定价
     * @param specificationAreas
     * @return
     */
    @PostMapping("/addSpecification")
    public RespResult addSpecification(@RequestBody SpecificationAreaDto specificationAreas){
        return service.addSpecification(specificationAreas);
    }
    /**
     * 编辑
     * @param specificationAreas
     * @return
     */
    @PostMapping("/updateSpecification")
    public RespResult updateSpecification(@RequestBody SpecificationAreaDto specificationAreas){
        return service.updateSpecification(specificationAreas);
    }
}
